package com.scrcu.cloud.wechat.home.endpoint.common.exception;

/**
 * @auther: siliang liu
 * @date: 2024/1/15 16:42
 * @description: 自定义业务异常
 * @version: 1.0.0
 */
public class BusiException extends RuntimeException{

    private static final long serialVersionUID = 7494211675424867554L;

    private String errCode = "500";

    private final String errMsg;

    public BusiException(String errMsg){
        this.errMsg = errMsg;
    }

    public BusiException(String errCode, String message){
        this.errCode = errCode;
        this.errMsg = message;
    }


    public BusiException(String errMsg, Throwable e){
        super(errMsg);
        this.errMsg = errMsg;
    }

    @Override
    public String getMessage() {
        return errMsg;
    }


    public String getErrCode(){
        return errCode;
    }
}
